/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.zx.course.question.entity;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.zx.course.answers.entity.TcourseAnswers;

/**
 * 课程提问表Entity
 * @author zpp
 * @version 2020-02-16
 */
@Table(name="t_course_question", alias="a", columns={
		@Column(name="id", attrName="id", label="主键", isPK=true),
		@Column(name="ask_user_id", attrName="askUserId", label="提问者"),
		@Column(name="user_name", attrName="userName", label="客户名称", queryType=QueryType.LIKE),
		@Column(name="user_avatar_url", attrName="userAvatarUrl", label="客户头像"),
		@Column(name="course_id", attrName="courseId", label="课程id"),
		@Column(name="course_name", attrName="courseName", label="课程名称", queryType=QueryType.LIKE),
		@Column(name="course_img", attrName="courseImg", label="课程封面"),
		@Column(name="content", attrName="content", label="内容"),
		@Column(name="course_hours_id", attrName="courseHoursId", label="课时标识"),
		@Column(name="course_hours_name", attrName="courseHoursName", label="课时名称"),
		
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class TcourseQuestion extends DataEntity<TcourseQuestion> {
	
	private static final long serialVersionUID = 1L;
	private String askUserId;		// 提问者
	private String userName;		// 客户名称
	private String userAvatarUrl;		// 客户头像
	private String courseId;		// 课程id
	private String courseName;		// 课程名称
	private String courseImg;		// 课程封面
	private String content;		// 内容
	private String courseHoursId;
	private String courseHoursName;
	private List<TcourseAnswers> answers=new ArrayList<TcourseAnswers>();
	
	public List<TcourseAnswers> getAnswers() {
		return answers;
	}

	public void setAnswers(List<TcourseAnswers> answers) {
		this.answers = answers;
	}

	public String getCourseHoursId() {
		return courseHoursId;
	}

	public void setCourseHoursId(String courseHoursId) {
		this.courseHoursId = courseHoursId;
	}

	public String getCourseHoursName() {
		return courseHoursName;
	}

	public void setCourseHoursName(String courseHoursName) {
		this.courseHoursName = courseHoursName;
	}

	public TcourseQuestion() {
		this(null);
	}

	public TcourseQuestion(String id){
		super(id);
	}
	
	@Length(min=0, max=50, message="提问者长度不能超过 50 个字符")
	public String getAskUserId() {
		return askUserId;
	}

	public void setAskUserId(String askUserId) {
		this.askUserId = askUserId;
	}
	
	@Length(min=0, max=50, message="客户名称长度不能超过 50 个字符")
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	@Length(min=0, max=255, message="客户头像长度不能超过 255 个字符")
	public String getUserAvatarUrl() {
		return userAvatarUrl;
	}

	public void setUserAvatarUrl(String userAvatarUrl) {
		this.userAvatarUrl = userAvatarUrl;
	}
	
	@Length(min=0, max=50, message="课程id长度不能超过 50 个字符")
	public String getCourseId() {
		return courseId;
	}

	public void setCourseId(String courseId) {
		this.courseId = courseId;
	}
	
	@Length(min=0, max=50, message="课程名称长度不能超过 50 个字符")
	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}
	
	@Length(min=0, max=10, message="课程封面长度不能超过 10 个字符")
	public String getCourseImg() {
		return courseImg;
	}

	public void setCourseImg(String courseImg) {
		this.courseImg = courseImg;
	}
	
	@Length(min=0, max=255, message="内容长度不能超过 255 个字符")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
}